package movgen;

public class EnPassant {
	
	    public static final int EP_SHIFT = 25; 
	    public static final int EP_CLEAR = 0x1FFFFFF;
	    
	    public static int getEPSquare(int irrevState)
		{
			return  (irrevState >> EP_SHIFT); // Since the ep value is last in the integer it doesn't need a mask	
		}
	    
		public static int setEnPassantValue(int irrevState, int value) {
			irrevState = (irrevState & EP_CLEAR); // Clear the  value
			return (irrevState | (value << EP_SHIFT)); // Change the value and return the new irrev state integer
		}
}
